document.querySelectorAll('h2').forEach(header => {
    header.addEventListener('click', function(event) {
      event.preventDefault();
      document.querySelector(`[href="#${this.id}"]`).scrollIntoView({
        behavior: 'smooth'
      });
    });
  });